﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CurrencyForm.ascx.cs"
    Inherits="SalesManagement.Controls.List.CurrencyForm" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<ext:Window ID="winDetails" runat="server" Title="Chi tiết Đơn vị tiền tệ" Frame="false"
    Hidden="true" CenterOnLoad="true" Width="400" Height="100" Padding="5" Resizable="false"
    Closable="true" Layout="Fit" AutoHeight="true" Icon="Group">
    <Items>
        <ext:FormPanel ID="FormPanel1" runat="server" Split="true" Frame="false" Header="false"
            LabelWidth="80" AutoHeight="true" Border="false" MonitorValid="true" BodyStyle="background-color:transparent;"
            Layout="row" AutoScroll="true">
            <Items>
                <ext:Hidden ID="hdfCurrencyId" runat="server" />
                <ext:TextField ID="txtCurrencyCode" runat="server" FieldLabel="Mã" AllowBlank="false"
                    AnchorHorizontal="100%" BlankText="Không để trống" />
                <ext:TextField ID="txtCurrencyName" runat="server" FieldLabel="Tên" AllowBlank="false"
                    AnchorHorizontal="100%" BlankText="Không để trống" />
                <ext:CompositeField ID="CompositeField2" runat="server" AnchorHorizontal="100%" FieldLabel="Tỷ giá">
                    <Items>
                        <ext:TextField ID="txtRate" runat="server" Width="111" AllowBlank="false" BlankText="Không để trống" />
                        <ext:DisplayField ID="DisplayField1" runat="server" Text="Định dạng:" />
                        <ext:TextField ID="txtCustomFormatting" runat="server" Width="111" AllowBlank="false"
                            BlankText="Không để trống" />
                    </Items>
                </ext:CompositeField>
                <ext:TextArea ID="txtDescription" runat="server" FieldLabel="Ghi chú" AllowBlank="true"
                    AnchorHorizontal="100%" />
                <ext:CheckboxGroup ID="CheckboxGroup2" runat="server" FieldLabel="Mặc định">
                    <Items>
                        <ext:Checkbox ID="ckbIsDefault" runat="server" Checked="false" />
                    </Items>
                </ext:CheckboxGroup>
                <ext:CheckboxGroup ID="CheckboxGroup1" runat="server" FieldLabel="Kích hoạt">
                    <Items>
                        <ext:Checkbox ID="ckbIsActive" runat="server" Checked="true" />
                    </Items>
                </ext:CheckboxGroup>
            </Items>
            <Listeners>
                <ClientValidation Handler="#{btnSave}.setDisabled(!valid);" />
            </Listeners>
        </ext:FormPanel>
    </Items>
    <Buttons>
        <ext:Button ID="btnSave" runat="server" Text="Lưu" Icon="Disk">
            <DirectEvents>
                <Click OnEvent="btnSave_Click" />
            </DirectEvents>
        </ext:Button>
        <ext:Button ID="btnCancel" runat="server" Text="Hủy bỏ" Icon="Cancel">
            <Listeners>
                <Click Handler="#{winDetails}.hide();" />
            </Listeners>
        </ext:Button>
    </Buttons>
</ext:Window>
<%--<ext:Window ID="winDetails" runat="server" Title="Phương thức nhập khác" Icon="PageForward"
    Width="500" Height="250" Modal="true" Hidden="true" Layout="FormLayout" Padding="5">
    <Items>
        <ext:FormPanel ID="FormPanel1" runat="server" BodyBorder="false"
            MonitorPoll="500" MonitorValid="true" Padding="5" Width="600" Height="250" ButtonAlign="Right">
         <Items>
                <ext:CompositeField ID="CompositeField1" 
                        runat="server"
                        AnchorHorizontal="-20"
                        MsgTarget="Side"
                        FieldLabel="Mã đơn vị (*)">
                <Items>
                <ext:TextField ID="txtID" runat="server" AllowBlank="false" AnchorHorizontal="50%" />
                <ext:Label ID="text" runat="server" Text="Số thứ tự:" />
                <ext:TextField ID="txtNumber" runat="server" AllowBlank="false" AnchorHorizontal="40%" />
                </Items>
                </ext:CompositeField>
                <ext:TextField ID="txtName" runat="server" FieldLabel="Tên đơn vị (*)" AllowBlank="false" AnchorHorizontal="70%" />
                <ext:CompositeField ID="CompositeField2" 
                        runat="server"
                        AnchorHorizontal="-20"
                        MsgTarget="Side"
                        FieldLabel="Tỷ giá tham khảo">
                <Items>
                <ext:TextField ID="txtRate" runat="server" AnchorHorizontal="50%" />
                <ext:Label ID="Label1" runat="server" Text="Đầu kì:" />
                <ext:TextField ID="txtFirstPeriod" runat="server" AnchorHorizontal="50%" />
                </Items>
                </ext:CompositeField>        
                
                <ext:TextArea ID="txtGhichu" runat="server" FieldLabel="Ghi chú" AnchorHorizontal="70%"/>
         </Items>
        </ext:FormPanel>
    </Items>
    <Buttons>
        
        <ext:Button ID="btnSave" runat="server" Text="Save" Icon="Disk">
            <DirectEvents>
            <Click OnEvent="btnSave_Click" />
            </DirectEvents>
        </ext:Button>
        <ext:Button ID="btnCancel" runat="server" Text="Cancel" Icon="Cancel">
            <Listeners>
                <Click Handler="#{winDetails}.hide();" />
            </Listeners>
        </ext:Button>
        
    </Buttons>
</ext:Window>--%>